3.259 \(\int \frac{\sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}} \, dx\)

Optimal. Leaf size=80 \[ \frac{\sqrt{1-\frac{a \sin ^2(e+f x)}{a+b}} \text{EllipticF}\left (\sin ^{-1}(\sin (e+f x)),\frac{a}{a+b}\right )}{f \sqrt{\cos ^2(e+f x)} \sqrt{\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}} \]

[Out]

(EllipticF[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a + b)])/(f*Sqrt[Cos[e + f*x]^2]*Sqrt
[Sec[e + f*x]^2*(a + b - a*Sin[e + f*x]^2)])

________________________________________________________________________________________

Rubi [A]  time = 0.271798, antiderivative size = 103, normalized size of antiderivative = 1.29, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {4148, 6722, 1974, 421, 419} \[ \frac{\sqrt{1-\frac{a \sin ^2(e+f x)}{a+b}} \sqrt{a \cos ^2(e+f x)+b} F\left (\sin ^{-1}(\sin (e+f x))|\frac{a}{a+b}\right )}{f \sqrt{\cos ^2(e+f x)} \sqrt{-a \sin ^2(e+f x)+a+b} \sqrt{a+b \sec ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]

[Out]

(Sqrt[b + a*Cos[e + f*x]^2]*EllipticF[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a + b)])/(
f*Sqrt[Cos[e + f*x]^2]*Sqrt[a + b*Sec[e + f*x]^2]*Sqrt[a + b - a*Sin[e + f*x]^2])

Rule 4148

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x
], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] &&  !IntegerQ
[p]

Rule 6722

Int[(u_.)*((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[(a + b*v^n)^FracPart[p]/(v^(n*FracPart[p])*(b + a/
v^n)^FracPart[p]), Int[u*v^(n*p)*(b + a/v^n)^p, x], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[p] && ILtQ[n, 0] &
& BinomialQ[v, x] &&  !LinearQ[v, x]

Rule 1974

Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{p, q}, x] &&
 BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  !BinomialMatchQ[{u, v}, x]

Rule 421

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Dist[Sqrt[1 + (d*x^2)/c]/Sqrt[c + d*
x^2], Int[1/(Sqrt[a + b*x^2]*Sqrt[1 + (d*x^2)/c]), x], x] /; FreeQ[{a, b, c, d}, x] &&  !GtQ[c, 0]

Rule 419

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Simp[(1*EllipticF[ArcSin[Rt[-(d/c),
2]*x], (b*c)/(a*d)])/(Sqrt[a]*Sqrt[c]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] &
& GtQ[a, 0] &&  !(NegQ[b/a] && SimplerSqrtQ[-(b/a), -(d/c)])

Rubi steps

\begin{align*} \int \frac{\sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1-x^2\right ) \sqrt{a+\frac{b}{1-x^2}}} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\sqrt{b+a \cos ^2(e+f x)} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2} \sqrt{b+a \left (1-x^2\right )}} \, dx,x,\sin (e+f x)\right )}{f \sqrt{\cos ^2(e+f x)} \sqrt{a+b \sec ^2(e+f x)}}\\ &=\frac{\sqrt{b+a \cos ^2(e+f x)} \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2} \sqrt{a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt{\cos ^2(e+f x)} \sqrt{a+b \sec ^2(e+f x)}}\\ &=\frac{\left (\sqrt{b+a \cos ^2(e+f x)} \sqrt{1-\frac{a \sin ^2(e+f x)}{a+b}}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2} \sqrt{1-\frac{a x^2}{a+b}}} \, dx,x,\sin (e+f x)\right )}{f \sqrt{\cos ^2(e+f x)} \sqrt{a+b \sec ^2(e+f x)} \sqrt{a+b-a \sin ^2(e+f x)}}\\ &=\frac{\sqrt{b+a \cos ^2(e+f x)} F\left (\sin ^{-1}(\sin (e+f x))|\frac{a}{a+b}\right ) \sqrt{1-\frac{a \sin ^2(e+f x)}{a+b}}}{f \sqrt{\cos ^2(e+f x)} \sqrt{a+b \sec ^2(e+f x)} \sqrt{a+b-a \sin ^2(e+f x)}}\\ \end{align*}

Mathematica [A]  time = 0.22415, size = 69, normalized size = 0.86 \[ \frac{\sec (e+f x) \sqrt{\frac{a \cos (2 (e+f x))+a+2 b}{a+b}} \text{EllipticF}\left (e+f x,\frac{a}{a+b}\right )}{\sqrt{2} f \sqrt{a+b \sec ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]

[Out]

(Sqrt[(a + 2*b + a*Cos[2*(e + f*x)])/(a + b)]*EllipticF[e + f*x, a/(a + b)]*Sec[e + f*x])/(Sqrt[2]*f*Sqrt[a +
b*Sec[e + f*x]^2])

________________________________________________________________________________________

Maple [C]  time = 0.399, size = 269, normalized size = 3.4 \begin{align*}{\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{2}\sqrt{2}}{f\cos \left ( fx+e \right ) \left ( -1+\cos \left ( fx+e \right ) \right ) }\sqrt{{\frac{1}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) } \left ( i\cos \left ( fx+e \right ) \sqrt{a}\sqrt{b}-i\sqrt{a}\sqrt{b}+a\cos \left ( fx+e \right ) +b \right ) }}\sqrt{-2\,{\frac{i\cos \left ( fx+e \right ) \sqrt{a}\sqrt{b}-i\sqrt{a}\sqrt{b}-a\cos \left ( fx+e \right ) -b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}{\it EllipticF} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }\sqrt{{\frac{1}{a+b} \left ( 2\,i\sqrt{a}\sqrt{b}+a-b \right ) }}},\sqrt{-{\frac{1}{ \left ( a+b \right ) ^{2}} \left ( 4\,i{a}^{{\frac{3}{2}}}\sqrt{b}-4\,i\sqrt{a}{b}^{{\frac{3}{2}}}-{a}^{2}+6\,ab-{b}^{2} \right ) }} \right ){\frac{1}{\sqrt{{\frac{1}{a+b} \left ( 2\,i\sqrt{a}\sqrt{b}+a-b \right ) }}}}{\frac{1}{\sqrt{{\frac{b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2}}{ \left ( \cos \left ( fx+e \right ) \right ) ^{2}}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x)

[Out]

1/f/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)*sin(f*x+e)^2*2^(1/2)*(1/(a+b)*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1
/2)*b^(1/2)+a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*(-2/(a+b)*(I*cos(f*x+e)*a^(1/2)*b^(1/2)-I*a^(1/2)*b^(1/2)-a*
cos(f*x+e)-b)/(1+cos(f*x+e)))^(1/2)*EllipticF((-1+cos(f*x+e))*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+
e),(-(4*I*a^(3/2)*b^(1/2)-4*I*a^(1/2)*b^(3/2)-a^2+6*a*b-b^2)/(a+b)^2)^(1/2))/((b+a*cos(f*x+e)^2)/cos(f*x+e)^2)
^(1/2)/cos(f*x+e)/(-1+cos(f*x+e))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right )^{2} + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(sec(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right )^{2} + a}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

integral(sec(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec{\left (e + f x \right )}}{\sqrt{a + b \sec ^{2}{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)**2)**(1/2),x)

[Out]

Integral(sec(e + f*x)/sqrt(a + b*sec(e + f*x)**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right )^{2} + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(sec(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)